All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class quicktime.std.music.NoteChannel

java.lang.Object
   |
   +----quicktime.QTObject
           |
           +----quicktime.std.music.NoteChannel

public final class NoteChannel
extends QTObject
implements QuickTimeLib
Note channels are used to play notes. The application can either provide the NoteAllocator component for the NoteChanel or can allow the system to create a default one.


Variable Index

 o kMicroControllerResolution
The smallest step that will effect a change in controller resolution
 o kMicrotonalResolution
The smallest microtone is a semitone / 128.

Constructor Index

 o NoteChannel(int, int)
Creates a new NoteChannel object with the request instrument and polyphony.
 o NoteChannel(NoteAllocator, int)
Creates a new NoteChannel object.
 o NoteChannel(NoteAllocator, NoteRequest)
Creates a new NoteChannel object.
 o NoteChannel(NoteRequest)
Creates a new NoteChannel object using the default NoteAllocator

QuickTime::NANewNoteChannel

Method Index

 o findTone(ToneDescription)
Locate the best fitting instrument number for the given ToneDescription.
 o getController(int)
Retrieves the current value for the specified controller The micro controller resolution is 128 steps (kMicroControllerResolution) per semitone.
 o getIndexInfo()
Returns the Music component index of the note channel.
 o getKnob(int)
Returns the value of a knob for the note channel.
 o getNoteAllocator()
Returns the NoteAllocator that owns this NoteChannel
 o getNoteRequest()
Get the NoteRequest that corresponds to this NoteChannel.
 o getPartInfo()
Returns the Music component part number of the note channel.
 o pickEditInstrument(String, int)
Presents a user interface for changing the instrument used by the note channel.
 o playNote(float, int)
Plays a musical note with given pitch and velocity.
 o playNoteCents(int, int, int)
Plays a musical note with given pitch and velocity.
 o playNoteRaw(int, int)
Plays a musical note with given pitch and velocity.
 o preroll()
Will attempt to re-allocate the note channel if it was invalid previously.
 o reset()
Turns off all currently sounding notes, and resets all controllers to their default values.
 o sendMIDI(MusicMIDIPacket)
Get the NoteRequest that corresponds to this NoteChannel.
 o setAtomicInstrument(AtomicInstrument, int)
Initialises a note channel with an atomic instrument.
 o setBalance(int)
Modifies the pan controller setting for the note channel.
 o setController(int, float)
Changes the specified controller to the specified value.
 o setControllerRaw(int, int)
Changes the specified controller to the specified value.
 o setInstrumentNumber(int)
Change the instrument setting to the specified instrument number.
 o setKnob(int, int)
Sets the value of a knob for the note channel.
 o setSoundLocalization(SoundLocalization)
Passes sound localization data to a note channel.
 o setVolume(float)
Sets the volume on the note channel.
 o unroll()
Marks a note channel as available to be stolen.

Variables

 o kMicrotonalResolution
 public static final float kMicrotonalResolution
The smallest microtone is a semitone / 128. This constant expresses that value (1/128).

 o kMicroControllerResolution
 public static final float kMicroControllerResolution
The smallest step that will effect a change in controller resolution

Constructors

 o NoteChannel
 public NoteChannel(int gmNumber,
                    int poly) throws QTException
Creates a new NoteChannel object with the request instrument and polyphony. This constructor will use the system created NoteAllocator, which can be retrieved if required, through the NoteChannel.getNoteAllocator() method once the NoteChannel is created.

QuickTime::NANewNoteChannel

Parameters:
na - the NoteAllocator component instance to use
nr - attributes of note request
 o NoteChannel
 public NoteChannel(NoteRequest nr) throws QTException
Creates a new NoteChannel object using the default NoteAllocator

QuickTime::NANewNoteChannel

Parameters:
na - the NoteAllocator component instance to use
nr - attributes of note request
 o NoteChannel
 public NoteChannel(NoteAllocator na,
                    NoteRequest nr) throws QTException
Creates a new NoteChannel object.

QuickTime::NANewNoteChannel

Parameters:
na - the NoteAllocator component instance to use
nr - attributes of note request
 o NoteChannel
 public NoteChannel(NoteAllocator na,
                    int gmNumber) throws QTException
Creates a new NoteChannel object.

QuickTime::NANewNoteChannel



QuickTime::NAStuffToneDescription

Parameters:
na - the NoteAllocator component instance to use
gmNumber - the general MIDI number for the desired instrument

Methods

 o getNoteAllocator
 public final NoteAllocator getNoteAllocator()
Returns the NoteAllocator that owns this NoteChannel

 o getIndexInfo
 public final int getIndexInfo() throws StdQTException
Returns the Music component index of the note channel.

QuickTime::NAGetNoteChannelInfo

Returns:
index
 o getPartInfo
 public final int getPartInfo() throws StdQTException
Returns the Music component part number of the note channel.

QuickTime::NAGetNoteChannelInfo

Returns:
part number
 o preroll
 public final void preroll() throws StdQTException
Will attempt to re-allocate the note channel if it was invalid previously.

QuickTime::NAPrerollNoteChannel

 o unroll
 public final void unroll() throws StdQTException
Marks a note channel as available to be stolen.

QuickTime::NAUnrollNoteChannel

 o reset
 public final void reset() throws StdQTException
Turns off all currently sounding notes, and resets all controllers to their default values.

QuickTime::NAResetNoteChannel

 o setVolume
 public final void setVolume(float volume) throws StdQTException
Sets the volume on the note channel.

QuickTime::NASetNoteChannelVolume

Parameters:
volume - volume value
 o setBalance
 public final void setBalance(int balance) throws StdQTException
Modifies the pan controller setting for the note channel.

QuickTime::NASetNoteChannelBalance

Parameters:
balance - pan value (-128 left, to 128 right)
 o playNoteRaw
 public final void playNoteRaw(int pitch,
                               int velocity) throws StdQTException
Plays a musical note with given pitch and velocity.

QuickTime::NAPlayNote

Parameters:
pitch - MIDI pitch values (0 to 127, 60 is middle C)
velocity - velocity of note, where 0 = silence - note off.
 o playNoteCents
 public final void playNoteCents(int noteNumber,
                                 int cents,
                                 int velocity) throws StdQTException
Plays a musical note with given pitch and velocity. The microtone resolution is 128 steps (kMicrotonalResolution) per semitone.

QuickTime::NAPlayNote

Parameters:
noteNumber - 0 -> 127 correspond to MIDI note numbers (60 is middle C).
cents - 0 -> 100 correspond to the division of a semitone into 100 logarithmically equal segments.
velocity - velocity of note, where 0 = silence - note off.
 o playNote
 public final void playNote(float pitch,
                            int velocity) throws StdQTException
Plays a musical note with given pitch and velocity. The microtone resolution is 128 steps (kMicrotonalResolution) per semitone.

QuickTime::NAPlayNote

Parameters:
pitch - 1.000 -> 127.999 correspond to MIDI note numbers (60 is middle C).
velocity - velocity of note, where 0 = silence - note off.
 o getController
 public final float getController(int controllerNumber) throws StdQTException
Retrieves the current value for the specified controller The micro controller resolution is 128 steps (kMicroControllerResolution) per semitone.

QuickTime::NAGetController

Parameters:
controllerNumber - which controller
controllerValue - the new controller value, range -128.000 to 127.999
 o setControllerRaw
 public final void setControllerRaw(int controllerNumber,
                                    int controllerValue) throws StdQTException
Changes the specified controller to the specified value.

QuickTime::NASetController

Parameters:
controllerNumber - which controller
controllerValue - the new controller value, dealing with raw controller values, which have the full range of a short (-32768 to 32767)
 o setController
 public final void setController(int controllerNumber,
                                 float controllerValue) throws StdQTException
Changes the specified controller to the specified value. The micro controller resolution is 128 steps (kMicroControllerResolution) per semitone.

QuickTime::NASetController

Parameters:
controllerNumber - which controller
controllerValue - the new controller value, range -128.000 to 127.999
 o getKnob
 public final int getKnob(int knobNumber) throws StdQTException
Returns the value of a knob for the note channel.

QuickTime::NAGetKnob

Parameters:
knobNumber - index or ID of the knob
Returns:
the value of the knob
 o setKnob
 public final void setKnob(int knobNumber,
                           int knobValue) throws StdQTException
Sets the value of a knob for the note channel.

QuickTime::NASetKnob

Parameters:
knobNumber - index or ID of the knob
knobValue - the value of the knob
 o findTone
 public final int findTone(ToneDescription td) throws StdQTException
Locate the best fitting instrument number for the given ToneDescription.

QuickTime::NAFindNoteChannelTone

Parameters:
td - description for instrument fit
Returns:
the instrument index of fit
 o setAtomicInstrument
 public final void setAtomicInstrument(AtomicInstrument instrument,
                                       int flags) throws StdQTException
Initialises a note channel with an atomic instrument.

QuickTime::NASetAtomicInstrument

Parameters:
instrument - the AtomicInstrument to set the channel to.
flags - use the set flags from Atomic instrument.
 o setInstrumentNumber
 public final void setInstrumentNumber(int instrumentNumber) throws StdQTException
Change the instrument setting to the specified instrument number.

QuickTime::NASetInstrumentNumber

Parameters:
instrumentNumber - instrument number to apply
 o getNoteRequest
 public final NoteRequest getNoteRequest() throws QTException
Get the NoteRequest that corresponds to this NoteChannel.

QuickTime::NAGetNoteRequest

Returns:
a new NoteRequest class with the parameters of this NoteChannel
 o pickEditInstrument
 public final void pickEditInstrument(String prompt,
                                      int flags) throws StdQTException
Presents a user interface for changing the instrument used by the note channel.

QuickTime::NAPickEditInstrument

Parameters:
prompt - Dialog box prompt "New Instrument..."
flags - flags to limit user options
 o sendMIDI
 public final void sendMIDI(MusicMIDIPacket mp) throws StdQTException
Get the NoteRequest that corresponds to this NoteChannel.

QuickTime::NASendMIDI

 o setSoundLocalization
 public final void setSoundLocalization(SoundLocalization slData) throws StdQTException
Passes sound localization data to a note channel.

QuickTime::NASetNoteChannelSoundLocalization

Parameters:
slData - sound localization data

All Packages  Class Hierarchy  This Package  Previous  Next  Index